﻿using System;
using System.Collections.Generic;
using System.Text;

namespace GameProtocol.DTO.Const
{
    public class BuildData
    {
        public static readonly Dictionary<int, BuildDataModel> buildDic = new Dictionary<int, BuildDataModel>();

        static BuildData() {
            CreateDataModel(1, "高级鸡窝", 1000, 100, 50, 2, false, 100, false);
            CreateDataModel(2, "中级鸡窝", 600, 50, 50, 2, false, 100, false);
            CreateDataModel(3, "低级鸡窝", 300, 30, 50, 2, false, 100, false);
        }

        static void CreateDataModel(int code, string name, int hp, int att_num, float att_range, float att_speed, bool born, int bornTime, bool canAtt)
        {
            BuildDataModel model = new BuildDataModel(code, name,hp,att_num,att_range,att_speed,born,bornTime,canAtt);
            buildDic.Add(model.code, model);
        }


    }


    public class BuildDataModel{
        public bool born;//是否重生
        public int bornTime;//重生时间
        public bool canAtt;//是否攻击
        public int code; //建筑模型代码
        public string name;
        public int hp; //生命值
        public int att_num;//攻击力
        public float att_range;//攻击距离
        public float att_speed;//攻击速度

        public BuildDataModel() { }

        public BuildDataModel(int code, string name, int hp, int att_num, float att_range, float att_speed,bool born, int bornTime, bool canAtt) {
            this.code = code;
            this.name = name;
            this.hp = hp;
            this.att_num = att_num;
            this.att_range = att_range;
            this.born = born;
            this.bornTime = bornTime;
            this.canAtt = canAtt;
        }
    }


}
